From: Florian Müllner Date: Thu, 4 Oct 2012 17:38:37 +0000 (+0200) Subject: loginDialog: Rely on default button for activation X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5670 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=20d4ffde6e8dbae92c122abe2ca0bfaa570fbf5e;p=gnome-shell.git loginDialog: Rely on default button for activation Currently the default action is performed twice when pressing Return in the login dialog, once in response to the entry's 'activate' signal, and again by activating the default button. Usually this is not a problem, as the second invocation is simply ignored, however it breaks the case where multiple consecutive questions are asked (e.g. username and password in the 'Not listed' case). Fix the problem by not handling the 'activate' signal at all. https://bugzilla.gnome.org/show_bug.cgi?id=685511 --- diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index 5d1b6c062..404cae75b 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -901,15 +901,6 @@ const LoginDialog = new Lang.Class({ label: C_("button", "Sign In"), default: true }]; - this._promptEntryActivateCallbackId = this._promptEntry.clutter_text.connect('activate', - Lang.bind(this, function() { - hold.release(); - })); - hold.connect('release', Lang.bind(this, function() { - this._promptEntry.clutter_text.disconnect(this._promptEntryActivateCallbackId); - this._promptEntryActivateCallbackId = null; - })); - let tasks = [function() { return this._fadeInPrompt(); }, @@ -926,11 +917,6 @@ const LoginDialog = new Lang.Class({ }, _hidePrompt: function() { - if (this._promptEntryActivateCallbackId) { - this._promptEntry.clutter_text.disconnect(this._promptEntryActivateCallbackId); - this._promptEntryActivateCallbackId = null; - } - this.setButtons([]); let tasks = [function() {